package com.zhnc.dangjianpingtaiapp.gui.fragment;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import com.zhnc.dangjianpingtaiapp.R;
import com.zhnc.dangjianpingtaiapp.argum.GridDataHelp;
import com.zhnc.dangjianpingtaiapp.argum.ListDataHelp;
import com.zhnc.dangjianpingtaiapp.gui.base.BaseFragment;

/**
 * @author wangdh
 * @time 2019/4/2 13:50
 * @describe
 */
public class HomeCunWuFragment extends BaseFragment {
    private FrameLayout cunwu_1;
    private FrameLayout cunwu_2;
    private FrameLayout cunwu_3;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_home_cun_wu, container, false);
    }


    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        cunwu_1 = getView().findViewById(R.id.cunwu_1);
        cunwu_2 = getView().findViewById(R.id.cunwu_2);
        cunwu_3 = getView().findViewById(R.id.cunwu_3);

        ItemGridFragment _1 = new ItemGridFragment();
        _1.setRely(GridDataHelp.shehui2(getActivity(), _1));
        re(_1, R.id.cunwu_1);


        ItemListFragment _2 = new ItemListFragment();
        _2.setRely(ListDataHelp.zhengwu3(getActivity(), _2));
        re(_2, R.id.cunwu_2);


        ItemListFragment _3 = new ItemListFragment();
        _3.setRely(ListDataHelp.zhengwu4(getActivity(), _3));
        re(_3, R.id.cunwu_3);


    }
}
